package com.fire.rabbitmq.consumer;

import com.fire.rabbitmq.queue.QueueTopic;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author ：Mr.Fire
 * @date ：Created in 2021/4/25 16:15
 * @description：
 * @modified By：
 * @version: $
 */
@Component
public class Consumer6 {

    @RabbitListener(queues = QueueTopic.QUEUE_TOPIC_A)
    @RabbitHandler
    public void receiveA(String msg){
        System.out.println("Consumer6-topic-A收到路由消息："+msg);
    }

    @RabbitListener(queues = QueueTopic.QUEUE_TOPIC_B)
    @RabbitHandler
    public void receiveB(String msg){
        System.out.println("Consumer6-topic-B收到路由消息："+msg);
    }

    @RabbitListener(queues = QueueTopic.QUEUE_TOPIC_C)
    @RabbitHandler
    public void receiveC(String msg){
        System.out.println("Consumer6-topic-C收到路由消息："+msg);
    }

}
